package net.supcmdr.dnd5e.ui;

import java.awt.BorderLayout;
import java.awt.FlowLayout;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;

import net.supcmdr.dnd5e.AppMain;

@SuppressWarnings("serial")
public class AboutWindow extends JFrame {
	
	int width = 400;
	int height = 300;
	
	
	
	public AboutWindow(final AppMain app) {
		
		int x = app.getMainFrame().getX() + (app.getMainFrame().getWidth()-width)/2;
		int y = app.getMainFrame().getY() + (app.getMainFrame().getHeight()-height)/2;
		
		setBounds(x, y, width, height);
		setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		setAlwaysOnTop(true);
		setTitle("About");
		setResizable(false);
		
		JPanel panel = new JPanel();
		getContentPane().add(panel, BorderLayout.NORTH);
		panel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
		
		JLabel aboutLabel = new JLabel("About");
		panel.add(aboutLabel);
		
		setVisible(true);
	}
	
}
